"""The application's model objects"""
import sqlalchemy as sa
from sqlalchemy import types
from cookbook2.model.meta import Session, Base


def init_model(engine):
    """Call me before using any of the tables or classes in the model"""
    Session.configure(bind=engine)


class User(Base):
    __tablename__ = "User"
    #__mapper_args__ = dict(order_by="date desc")

    id = sa.Column(types.Integer, primary_key=True)
    login = sa.Column(types.Text())
    password = sa.Column(types.Text())
    first_name = sa.Column(types.Text())
    last_name = sa.Column(types.Text())
    email = sa.Column(types.Text())
    age = sa.Column(types.Text())
    city = sa.Column(types.Text())
    admin = sa.Column(types.Text())
    blocked = sa.Column(types.Text())




